import CommentPreview from "@/app/components/comment-preview/comment-preview";
import { List } from "antd";
import React from "react";

export interface UserCommentsProps {
  userInfo: API.GetUserInfoDto;
}

const UserComments: React.FC<UserCommentsProps> = ({ userInfo }) => {
  return (
    <List
      itemLayout="vertical"
      size="large"
      pagination={{
        pageSize: 10,
      }}
      dataSource={userInfo.comments}
      renderItem={(comment) => {
        return <CommentPreview comment={comment} />;
      }}
    />
  );
};

export default UserComments;
